package com.prestamomo.vil.ppa.pmvilpage;

import android.widget.ImageView;
import android.widget.LinearLayout;

import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import com.prestamomo.vil.ppa.R;
import com.prestamomo.vil.ppa.pmvilapi.PmvilQuestion;
import com.prestamomo.vil.ppa.pmvilpage.pmfitter.PmvilQuestionFiter;
import com.prestamomo.vil.ppa.pmvilpage.pmrot.PmvilAtyRoot;

import java.util.List;

public class PmvilQuestionListVy extends PmvilAtyRoot {

    private ImageView questListPmvilBack;
    private RecyclerView questListPmvilRecyle;

    @Override
    protected int getPmvilLayoutId() {
        return R.layout.question_list_pmvil_ly;
    }

    @Override
    protected void showPmvilUi() {
        questListPmvilBack = findViewById(R.id.questlist_pmvil_iv_back);
        questListPmvilRecyle = findViewById(R.id.questlist_pmvil_recycle);

    }

    @Override
    protected void clickePmvil() {
        questListPmvilBack.setOnClickListener(v -> finish());
    }

    @Override
    protected void loadPmvilData() {
        List<PmvilQuestion> questListPmvil = (List<PmvilQuestion>) getIntent().getSerializableExtra("quest_list_pmvil");
        PmvilQuestionFiter pmvilQuestionFiter = new PmvilQuestionFiter(pmvilAy, questListPmvil);
        questListPmvilRecyle.setAdapter(pmvilQuestionFiter);
    }
}
